import akka.actor.Actor
import akka.actor.ActorRef
import akka.actor.ActorSystem
import akka.actor.Props

case class Start(nOfNodes : Integer, nOfMessages : Integer)
case class StartSending()
case class StartDone()
case class Route(id : String, key : String, requestor : String, routeCount : Integer)
case class RouteResponse(id : String, node : NodeEntry, routeCount : Integer)
case class Join(id : String, newNode : NodeEntry)
case class JoinResponse(id : String, respondingNode : NodeEntry, tableRow : Array[NodeEntry], row : Integer, leaf : Leaf, lastResponce : Boolean)
case class JoinDone(id : String, respondingNode : NodeEntry, table : Array[Array[NodeEntry]], tableTime : Long, leaf : Leaf)
case class Done(avg : Double)
case class PrintState()

object Main extends App{    
  val system = ActorSystem("System")
  val supervisor = system.actorOf(Props[Supervisor], name = "Supervisor")
  
  supervisor ! Start(args(0).toInt, args(1).toInt)
  
  system.awaitTermination 
}

